package com.fhz.day003;

import androidx.appcompat.app.AppCompatActivity;

import android.os.Bundle;
import android.view.View;
import android.widget.LinearLayout;

import com.fhz.day003.databinding.ActivityMainBinding;

public class MainActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        ActivityMainBinding inflate = ActivityMainBinding.inflate(getLayoutInflater());
        LinearLayout root = inflate.getRoot();
        setContentView(root);

        inflate.btn.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                inflate.tv.setText("哈哈");
            }
        });

    }
}